package be.novelfaces.webdriver;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.pagefactory.AjaxElementLocatorFactory;

import be.novelfaces.showcase.webdriver.util.AjaxHelper;

public abstract class BaseElement {
	
	public BaseElement() {
		PageFactory.initElements( new AjaxElementLocatorFactory( WebDriverManager.getWebdriver(), 15 ), this );
	}

	private AjaxHelper ajaxHelper = new AjaxHelper();

	protected void waitForAjaxToComplete() {
		ajaxHelper.waitForAjaxToComplete();
	}

	protected WebDriver getWebDriver() {
		return WebDriverManager.getWebdriver();
	}

}